/**
 * Created by liubin on 2014/06/06.
 */
Ext.define('Order.view.StoreView', {
    extend: 'Ext.NestedList',
    xtype: 'orderlist',
    config: {
        //displayField:'name',
        updateTitleText:false,
        useTitleAsBackText:false,
        backText:'返回',
        store:'NestedItem',
        detailCard:{
            html:'You are viewing the detail card!'
        }
    },
    getItemTextTpl: function(node){
        console.log(node);
        switch(node.get('type'))
        {
            case 'item':
                 return '<div style="height: 30px;line-height: 30px;">' +
                 '<img src="{image}" width="30" heigh="30" style="vertical-align:middle;">' +
                 '<span>{name}</span><span style="float: right">单价:{price}</span></div>';

            default :
                 return '<div style="height: 30px;line-height: 30px;">' +
                     '<img src="{image}" width="30" heigh="30" style="vertical-align:middle;">' +
                     '<span>{name}</span></div>';
        }
    }
});